<!DOCTYPE html>
<html>

<head>
<title>添加代理</title>
<meta http-equiv="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="renderer" content="webkit">

<%include("/common/include.html"){}%>
<style>
	.required{
		display:inline-block;
		width: 30%;
	}
	.requiredx{
		display:inline-block;
		width: 89%;
	}
	label{
		text-align:right;
		width:70px;
		display:inline-block;
	}
</style>
<style type="text/css">
</style>
</head>

<body>
	<div class="easyui-panel" style="width: 100%; padding: 30px 60px; border-width: 0px;">
		<div  style="margin:auto;width:770px">
			<form id="addProduct" method="post" class="form">
					<!-- <div id="customerProduct" class="easyui-window" title="客户产品" style="width:480px;height:200px"  > -->
								<input type="hidden" name="cid" value="${cid}">
								<input type="hidden" name="bw" value="${bw}">
								<input type="hidden" name="sid" value="${sid}">
								<input type="hidden" name="mima" value="${mima}">
								<input type="hidden" name="jyproductIds" value="95e2ae17462e4d0eb1dc84bc63bc478a">
								<input type="hidden" name="gproductIds" value="daaba791f4104ae98504a1bc421e0d8d">
								<div >
									<div >
										<table   id="posSize1" border="1"  bordercolor="#DDDDDD" style="width:100%; text-align: center;font-size: 15px;">
										<tr style="height: 40px;font-weight: bold;">
										<td   colspan="2">精油（ 剩余${jysy}次）</td>
										<td colspan="2">按摩膏（ 剩余${gsy}次）</td>
										</tr>
										<tr style="height: 40px;font-weight: bold;">
										<td style="height: 40px;font-weight: bold;">精油</td>
										<td style="height: 40px;font-weight: bold;">
										<%if(jysy!='0'){%>
										<input  id="posqs" name="jyusage"  class="easyui-numberspinner inputBox theme-textbox-radius"  required="true" value="${jymr!}" data-options="precision:1,increment:0.1,min:0,label:'次'" labelPosition="after"  style="width: 180px"></input>
										<%}%>
										</td>
										<td>按摩膏</td>
										<td style="height: 40px;font-weight: bold;">
										<%if(gsy!='0'){%>
										<input id="poszdt" name="gusage" class="easyui-numberspinner inputBox theme-textbox-radius"  required="true" value="${gmr!}" data-options="precision:1,increment:0.1,min:0,label:'次'" labelPosition="after"  style="width: 180px"></input>
										<%}%>
										</td>
										</tr >
										<tr >
										</tr>
										</table>
										
									</div>
								</div>
								
							</div>
			</form>
		</div>
	</div>
	
	<script type="text/javascript">

		
		var $form = $('#addProduct');

		var submitNow = function($dialog, $grid, $tree, $pjq) {
			var url = "${cxt!}/beingServed/updateSer";
			$.post(url, sy.serializeObject($form), function(result) {
				if (result.msg==true) {
					//alert($("#mbtablediv" ).())
					//$dialog.panel('refresh');
					 //$grid.datagrid('reload');
					parent.window.nodeClick("正在服务", "/beingServed");
					//window.location.href = "${cxt!}/beingServed";
					$.slideMsg("添加成功！", $pjq);
					$dialog.dialog('destroy');
					
				} else {
					$.alert($pjq, result.msg);
				}
			}, 'json');
		};
		var submitForm = function($dialog, $grid, $tree, $pjq) {
			submitNow($dialog, $grid, $tree, $pjq);
		};

	</script>
</body>
</html>